/*
 * HomeNoticeHolder.java
 * business
 *
 * Created by ChenTao on 2017/1/16.
 *
 * Copyright (c) 2017年 yidiandao. All rights reserved.
 */

package com.yidiandao.business.ui.widget.listview.viewholder;

import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;

import com.yidiandao.business.R;
import com.yidiandao.business.ui.widget.listview.ViewHolder;
import com.yidiandao.business.ui.widget.view.NoticeView;

import java.util.List;

/** 首页-公告-ViewHolder */
public class HomeNoticeHolder extends ViewHolder {

    public NoticeView marqueeView;
    private RelativeLayout noticeLayout;
    private ImageView icNotice;

    @Override
    protected void initView(View rootView) {
        noticeLayout = (RelativeLayout) rootView.findViewById(R.id.notice_layout);
        icNotice = (ImageView) rootView.findViewById(R.id.ic_notice);
        marqueeView = (NoticeView) rootView.findViewById(R.id.marqueeView);
    }

    public void setNoticeData(List<String> noticeUrls) {
        marqueeView.setNoticeList(noticeUrls);
    }

    @Override
    protected int getItemLayoutId() {
        return R.layout.item_home_notice;
    }
}
